package com.vrv.netmgr.assets.detail;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.TextView;

import com.vrv.netmgr.R;
import com.vrv.netmgr.vo.IsqDevEntity;
import com.vrv.netmgr.vo.SerializableSoftwareQry;

/**
 * @Description 防违规外联策略详细信息
 * @author yangzijian
 * @date
 * 
 */
public class DetailSoftwareQryActivity extends Activity {
	//
	private IsqDevEntity info;
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		setContentView(R.layout.detail_softwareqry);
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.common_title);
		getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
		//
		initViews();
		setTitle();
	}
	//
	public void initViews(){
		//
		TextView unitName = (TextView) findViewById(R.id.softwareqry_unit);
		TextView depName = (TextView) findViewById(R.id.softwareqry_dep);
		TextView userName = (TextView) findViewById(R.id.softwareqry_user);
		TextView tel = (TextView) findViewById(R.id.softwareqry_tel);
		TextView addr = (TextView) findViewById(R.id.softwareqry_addr);
		TextView count = (TextView) findViewById(R.id.softwareqry_count);
		//
		info = (IsqDevEntity) getIntent().getSerializableExtra("info");
		//
		unitName.setText(info.getDeptName());
		depName.setText(info.getOfficeName());
		userName.setText(info.getUserName());
		tel.setText(info.getTel());
		addr.setText(info.getIpaddres());
		count.setText(info.getReserved3());
	}
	public void setTitle() {
		TextView title = (TextView) findViewById(R.id.title_text);
		title.setText("安装软件查询"+"["+info.getIpaddres()+"]");

		/**
		 * 返回按钮
		 */
		ImageButton backBtn = (ImageButton) findViewById(R.id.backBtn);
		backBtn.setVisibility(View.VISIBLE);
		backBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				onBackPressed();
			}
		});
	}
	@Override
	public void onBackPressed() {
		finish();
		overridePendingTransition(R.anim.push_right_out, R.anim.push_right_in);
		super.onBackPressed();
	}
}
